package org.footballmanager.pandafootball.system.controller.hy;

import org.footballmanager.pandafootball.common.constants.Constants;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/hy/footUser")
public class HyUserController {
    /* 实体名称 */
    private static final String ENTITYNAME = Constants.USER;
    private static final String VIEWPAGE = String.format(Constants.VIEWPAGE, Constants.HY, ENTITYNAME);

    @RequestMapping(value = "/view", method = RequestMethod.GET)
    public String openViewPage(Model map, HttpServletRequest req) {
        map.addAttribute(Constants.USER, req.getSession().getAttribute(ENTITYNAME));
        return VIEWPAGE;
    }

}
